package com.tavio.vaultboy.element;

import org.andengine.entity.primitive.Rectangle;
import org.andengine.opengl.vbo.VertexBufferObjectManager;

import com.tavio.vaultboy.element.state.FallingState;
import com.tavio.vaultboy.element.type.ElementType;

public abstract class RectangleElement extends Element{

	private Rectangle rectangle;
	
	private FallingState fallingState;
	
	public RectangleElement(ElementType elementType, float x, float y, float width, 
			float height, VertexBufferObjectManager vertexBufferObjectManager) {
		super(elementType, x, y, width, height, 0, vertexBufferObjectManager);
		rectangle = new Rectangle(x, y, width, height, vertexBufferObjectManager);
		rectangle.setZIndex(2);
	}
	
	public abstract void updatePositionAndCheckCollisions(float timeElapsed);
	
	public Rectangle getRectangle() {
		return rectangle;
	}

	public FallingState getFallingState() {
		return fallingState;
	}

	public void setFallingState(FallingState fallingState) {
		this.fallingState = fallingState;
	}
	
}
